package cn.pdd;

public class Lesson {
    private String l_name;
    private int credit;

    public Lesson() {
    }

    public Lesson(String l_name, int credit) {
        this.l_name = l_name;
        this.credit = credit;
    }

    public String getL_name() {
        return l_name;
    }

    public void setL_name(String l_name) {
        this.l_name = l_name;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }

    @Override
    public String toString() {
        return "Lesson{" +
                "l_name='" + l_name + '\'' +
                ", credit=" + credit +
                '}';
    }
    public void lesson(){
        System.out.println(l_name+"得了"+credit+"分");
    }
}
